{literal}
<script type="text/javascript">
    $(document).ready(function(){
	        $("#form_plano").validate({
        	rules: {
	            nome: { required: true },
	            descricao: { required: true },
	            valor: { required: true, maxlength: 11 }
	        },
	        messages: {
	            nome: "Obrigatorio",
	            descricao: {required: "Obrigatorio", maxlength: "O limite &eacute; de 200 caracteres"},
	            valor: { required: "Obrigatorio", maxlength: " 11 &eacute; o n&uacute;mero m&aacute;ximo de caracteres aceitos para o valor"}
	        },
	        submitHandler: function(form) {
				jqAjaxForm(form, "div_mensagem");
			}
        });

        $("#valor").priceFormat();

		//recupera servicos e retorna os servicos em checkbox
        jqAjaxLink("servico/check-box-servico?cod={/literal}{$plano->id}{literal}", "", "servicos");
        
    }); //fecha $(

    $("#descricao").wysiwyg({
		controls : {
	    	separator06 : { visible : false },
	        h1mozilla : { visible : false },
	        h2mozilla : { visible : false },
	        h3mozilla : { visible : false },
	        h1 : { visible : false },
	        h2 : { visible : false },
	        h3 : { visible : false }
		}
	});
    
</script>
{/literal}
<form id="form_plano" name="form_plano" method="post" action="{$_site.url}{$acao}">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mvTituloFundo">
				  <tr>
					<td>
					{if $tipocontato->id > 0}Editar{else}Novo{/if} Plano
					<input type="hidden" name="cod" value="{$plano->id}"/>
					</td>
				  </tr>
				</table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">                
                <tr>
                  <td class="contForm">
                  
                  <table width="100%" border="0" cellspacing="3" cellpadding="0">
                      <tr>
                        <td width="30%" valign="top" class="fundoTituloForm">Nome:</td>
                        <td class="bordaFormResp"><input name="nome" type="text" class="formulario tamanhoForm" id="nome" value="{$plano->vhr_nome}" maxlength="150"/></td>
                      </tr>
                      <tr>
                        <td width="30%" valign="top" class="fundoTituloForm">Valor b&aacute;sico:</td>
                        <td class="bordaFormResp"><input name="valor" type="text" class="formulario" id="valor" value="{$plano->flt_valor}" maxlength="11"/></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Descri&ccedil;&atilde;o:</td>
                        <td width="70%" class="bordaFormResp"><textarea name="descricao" id="descricao" rows="7" class="formulario tamanhoForm" maxlength="1000">{$plano->vhr_descricao}</textarea></td>
                      </tr>
                      <tr>
                        <td width="30%" valign="top" class="fundoTituloForm">Servi&ccedil;os que este plano pode conter:</td>
                        <td class="bordaFormResp"><div id="servicos"></div></td>
                      </tr>
                  </table>
                  
                  </td>
                </tr>
        <tr>
                  <td class="paddingTop15 paddingBottom15" align="center"><!-- === Botões ( Salvar e Limpar ) === -->
                      <span class="paddingRight15">
                      	<input type="submit" value="Salvar" class="botao">
                      </span>
                    <span class="paddingRight15">
                    <input name="limpar" type="reset" id="Limpar" value="Limpar" class="botao" />
                    </span>
                    <input type="button" value="Cancelar" onclick="cancelar(); return false;" class="botao">
                      <!-- Final === Botões ( Salvar e Limpar ) === -->                      </td>
                </tr>
              </table>	
    </form>
